home *** CD-ROM | disk | FTP | other *** search
- /*
- ** @(#) sybtypes.h 77.1 11/11/91
- **
- ** COMTYPES.H
- **
- ** Header file to be included in all files which use Common-Lib routines.
- ** This header file contains:
- a) definitions for NULL, FALSE, TRUE
- ** b) type definitions for the Common-Lib datatypess;
- */
-
- #ifndef __sybtypes__
- #define __sybtypes__
-
- #ifndef NULL
- #define NULL 0
- #endif /* NULL */
-
- #ifndef FALSE
- #define FALSE 0
- #endif /* FALSE */
-
- #ifndef TRUE
- #define TRUE 1
- #endif /* TRUE */
-
-
- #define COM_MAXCHAR 256
- /*
- ** Type definitions for Common-Lib datatypes.
- */
-
- typedef unsigned char COM_TINYINT; /* 1 byte integer */
- typedef short COM_SMALLINT; /* 2 byte integer */
- typedef long COM_INT; /* 4 byte integer */
- typedef char COM_CHAR; /* char type */
- typedef unsigned char COM_BINARY; /* binary type */
- typedef unsigned char COM_BIT; /* bit type */
-
- typedef struct com_datetime /* datetime type */
- {
- long dtdays; /* number of days since 1/1/1900 */
- long dttime; /* number 300th second since mid */
- } COM_DATETIME;
-
- typedef struct com_datetime4 /* 4-byte datetime type */
- {
- unsigned short days; /* number of days since 1/1/1900 */
- unsigned short minutes; /* number of minutes since midnight */
- } COM_DATETIME4;
-
- typedef struct com_money /* money type */
- {
- long mnyhigh;
- unsigned long mnylow;
- } COM_MONEY;
-
- typedef struct com_money4 /* 4-byte money type */
- {
- long mny4;
- } COM_MONEY4;
-
- typedef double COM_FLT8; /* float type */
-
- typedef float COM_REAL; /* 4-byte float type */
-
- typedef unsigned char COM_BYTE;
-
- typedef unsigned char COM_BOOL; /* for boolean values */
-
- typedef struct com_varychar /* Pascal-type string. */
- {
- COM_SMALLINT len; /* length of the character string */
- COM_CHAR str[COM_MAXCHAR]; /* string, with no NULL terminator */
- } COM_VARYCHAR;
- typedef struct com_varybin /* Pascal-type binary array. */
- {
- COM_SMALLINT len; /* length of the binary array */
- COM_BYTE array[COM_MAXCHAR];/* the array itself. */
- } COM_VARYBIN;
-
- typedef struct com_daterec
- {
- long dateyear; /* 1900 to the future */
- long datemonth; /* 0 - 11 */
- long datedmonth; /* 1 - 31 */
- long datedyear; /* 1 - 366 */
- long datedweek; /* 0 - 6 (Mon. - Sun.) */
- long datehour; /* 0 - 23 */
- long dateminute; /* 0 - 59 */
- long datesecond; /* 0 - 59 */
- long datemsecond; /* 0 - 997 */
- long datetzone; /* 0 - 127 */
- } COM_DATEREC;
-
- #endif /* __sybtypes__ */
-